//
//  QXNetworking.swift
//  QXWeibo
//
//  Created by QinXin on 15/6/25.
//  Copyright © 2015年 labi3285_Lab. All rights reserved.
//

import UIKit
import AFNetworking

// 这个单例采用基地址的方式管理网络
class QXNetworking: AFHTTPSessionManager {
    
    private static let instance: QXNetworking = {
        let urlSting = "https://api.weibo.com/"
        let baseURL = NSURL(string: urlSting)
        
        let ins = QXNetworking(baseURL: baseURL)
        ins.responseSerializer.acceptableContentTypes = NSSet(objects: "application/json", "text/json", "text/javascript", "text/plain") as Set<NSObject>
        return ins
    }()

    class func sharedNetworking() -> QXNetworking {
        return instance
    }

}
